package com.zhouyong.protocol;

import io.netty.handler.codec.LengthFieldBasedFrameDecoder;

/**
 * 预设长度（LTC）解码器解决黏包、拆包
 *
 * @author Y5696
 * @date 2023/3/13 15:16
 */

public class CustomizeFrameDecoder extends LengthFieldBasedFrameDecoder {
    public CustomizeFrameDecoder(int maxFrameLength, int lengthFieldOffset, int lengthFieldLength, int lengthAdjustment, int initialBytesToStrip) {
        super(maxFrameLength, lengthFieldOffset, lengthFieldLength, lengthAdjustment, initialBytesToStrip);
    }

    public CustomizeFrameDecoder() {
        this(1024, 12, 4, 0, 0);
    }
}
